const App = {
    mixins: [Save],//配置文件，路径/utils/mixins.js
    data() {
        return {
            Category: [],
            team: [],
            CycleData: [
                { value: "日", label: "日:1日" },
                { value: "周", label: "周:7日" },
                { value: "月", label: "月:30日" },
                { value: "半年", label: "半年:180日" },
            ],
        };
    },
    mounted() {
        this.GetCategory();

        this.Getteam();

    },
    methods: {
        GetCategory() {

            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                type: "POST",
                data: {
                    Data: 'patrol_category',
                    Condition: "Row_Status='0'"
                },
                success: (data) => {
                    this.Category = data; // 直接使用 this
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
                dataType: "json",
            });

        },
        Getteam() {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                type: "POST",
                data: {
                    Data: 'patrol_team',
                    Condition: "Row_Status='0'"
                },
                success: (data) => {
                    this.team = data; // 直接使用 this
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
                dataType: "json",
            });

        },
        validateInput() {
            let _this = this;
            if (_this.dataForm.Times < 1) {
                _this.dataForm.Times = 1;
            } else if (_this.dataForm.Times > 100) {
                _this.dataForm.Times = 100;
            }
        }

    },

};
const { createApp, ref } = Vue;
const app = createApp(App);
app.use(ElementPlus, { locale: zhCn });
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.component('yl-upload', ylUpload);
app.component('yl-select', ylSelect);
app.component('yl-text-editor', ylTextEditor);
const ElMessage = ElementPlus.ElMessage;
app.mount("#app");
